The stomach must survive HCl secreted by the gastric epithelium. This challenge is heightened by the frequent presence of compounds (e.g. non-steroidal anti-inflammatory drugs) or organisms (Helicobacter pylori) which compromise the gastric barrier to acid, leading to ulcers when the barrier is breached. An alkaline juxtamucosal gel layer is the first line of gastric defense: acting to protect the gastric epithelium from back-diffusion of acid from the lumen. We have developed a unique approach to non-invasively measure pH at the gastric surface in vivo. Using confocal microscopy, we have imaged a juxtamucosal alkaline layer, which converts to an acid layer when luminal pH is changed to values found in the fed stomach. Our results suggest a new model of gastric surface pH regulation, which includes a substantial change in the transporters that control surface pH. Our objective is to define the elements regulating luminal pH sensing and surface pH regulation in the stomach. Using primarily in vivo confocal microscopy of rat or mouse stomach, our first aim will define fundamental requirements for the stomach to sense and respond to luminal pH. We will a) define the timing and location of luminal pH change required for conversion from alkali to acid secretion, and b) test the role of luminal nutrients and buffers in surface pH regulation. In the second aim, we will question which molecules are transducers of the luminal pH stimulus that mediate the integrated regulation of both gastric acid and alkali secretion. We will focus on the role of somatostatin, PGE2, and capsaicin-sensitive afferent nerves containing CGRP. The role of somatostatin will be analyzed using antagonists and agonists selective for the somatostatin type 2 receptor (SST2) with parallel studies of SST2-knockout mice. The role of prostaglandin synthesis will be approached using selective inhibitors of known cycloxygenase (COX) isoforms, with parallel studies of COX-1 and COX-2 knockout mice. Capsaicin-sensitive afferents will be analyzed using vanilloid receptor agonists, CGRP receptor agonists and antagonists, with parallel studies of chemically deafferented animals. The third aim will ask how gastric mucosal damage disrupts surface pH regulation. We will generate microscopic lesions in the gastric epithelium by two-photon microscopy. Using this new model of focal gastric damage, we will follow the disruptions in surface pH regulation and the tissue repair process in real time. We will ask if aspirin, a major cause of clinical mucosal damage, weakens the gastric barrier by disruption of luminal pH sensing and surface pH regulation in normal and COX-knockout mice. We will determine if aspirin affects the repair of focal lesions created by two-photon microscopy. Results will integrate understanding of gastric defense with regulation of acid and alkali secretion.